package com.zed.api.games.answer.scene;

import com.zed.api.games.answer.show.AlternativeAnswer;
import com.zed.api.games.answer.show.CorrectAlternativeAnswer;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * 题库管理请求
 *
 * @author Zed
 */
public class AnswerShowWorldRequest {

    /**
     * 题目
     */
    private Object theme;

    private List<AlternativeAnswer> alternativeAnswers;

    private CorrectAlternativeAnswer correctAlternativeAnswer;

    private List<String> tips;

    public AnswerShowWorldRequest() {

    }

    /**
     * 获取合并的答案体系
     *
     * @return {@link List}
     */
    public List<AlternativeAnswer> getMergeAlternativeAnswer() {
        List<AlternativeAnswer> result = new ArrayList<>(this.alternativeAnswers);
        result.add(this.correctAlternativeAnswer);
        return Collections.unmodifiableList(result);
    }

    /**
     * 获取提示
     *
     * @return {@link List}
     */
    public List<String> getTips() {
        return this.tips == null ? Collections.emptyList() : Collections.unmodifiableList(this.tips);
    }

    /**
     * 获取题目
     *
     * @return {@link Object}
     */
    public Object getTheme() {
        return theme;
    }

    /**
     * 设置题目
     *
     * @param theme {@link Object}
     */
    public void setTheme(Object theme) {
        this.theme = theme;
    }

    /**
     * 获取可选答案
     *
     * @return {@link List}
     */
    public List<AlternativeAnswer> getAlternativeAnswers() {
        return alternativeAnswers;
    }

    /**
     * 设置可选答案
     *
     * @param alternativeAnswers {@link List}
     */
    public void setAlternativeAnswers(List<AlternativeAnswer> alternativeAnswers) {
        this.alternativeAnswers = alternativeAnswers;
    }

    /**
     * 获取正确答案
     *
     * @return {@link CorrectAlternativeAnswer}
     */
    public CorrectAlternativeAnswer getCorrectAlternativeAnswer() {
        return correctAlternativeAnswer;
    }

    /**
     * 设置正确答案
     *
     * @param correctAlternativeAnswer {@link CorrectAlternativeAnswer}
     */
    public void setCorrectAlternativeAnswer(CorrectAlternativeAnswer correctAlternativeAnswer) {
        this.correctAlternativeAnswer = correctAlternativeAnswer;
    }

}
